This disclosure relates generally to the field of determination of resource usage in a computing system.
Determination of resource usage by various tasks executed in a computing system is critical for many aspects of processing, such as code refinement and billing. Computing systems typically produce log records containing information that can be used to determine various resource usage metrics for the different tasks executed by the computing system. For example, central processing unit (CPU) usage by a specific task may be determined by analyzing the log records. The log records may include data or metrics, describing various aspects of task resource usage in the computing system, and may correlate the data to specific tasks. The resource usage information contained in the log records may be either explicit (a metric provided by the producer of the record) or implicit (inferred from other information in the log records or by combining information from several log records).
A computing system may execute tasks by defining a set of transactions, each of which is associated with the execution of a program. The computing system may log performance metrics separately for transactions and programs. A transaction may include, for example, a request, which may be from a user at a remote terminal, for the computing system to perform a specific operation. When such a transaction is received by the computing system, and a program in the computing system is executed to handle the transaction. In another example, a transaction may include a batch job that executes a program in the computing system. An instance of a program may handle multiple transactions. While the computing system may produce log records for both program and transaction metrics, the log records may not preserve data at the transaction level. Instead, the transaction-related data may be summarized at the program level before being written to the log. Multiple transactions executing the same program will therefore have their usage metrics accumulated together and attributed to the single program.
Transaction-level metrics that are accumulated for all transactions executed by an instance of a program may be referred to as a summarized program-level metric. A summarized program-level metric may be apportioned among the transactions that executed the program by dividing the summarized program-level metric equally across all the transactions that executed the program. For example, the CPU usage for a transaction, t, that executes program P is approximated by ct=CP/n, where ct is the estimated CPU utilization for a transaction instance t, CP is total CPU utilization for the program P, and n is the number of transactions that executed program P. The CPU utilization for the transaction t is therefore an approximation based on transaction execution counts, and may not be an accurate reflection of the CPU utilization of the individual transaction t, as exactly the same CPU utilization is attributed to each transaction that executed program P.